import React from 'react';
import { Link ,Outlet } from 'react-router-dom';

import { UploadOutlined, UserOutlined, VideoCameraOutlined } from '@ant-design/icons';
import { Layout, Menu } from 'antd';
import './index.scss';

const { Content, Sider } = Layout;

const Home = () => {
    return (
        <div className='home'>
            <Layout>
                <Sider>
                    <Menu
                        theme="light"
                        defaultSelectedKeys={['1']}
                        items={
                            [
                                {
                                    key: '1',
                                    icon: <UploadOutlined/>,
                                    label: <Link to='/home'>公告管理</Link>,
                                },
                                {
                                    key: '2',
                                    icon: <UserOutlined/>,
                                    label: <Link to='/home/student'>学生管理</Link>,
                                },
                                {
                                    key: '3',
                                    icon: <VideoCameraOutlined/>,
                                    label: <Link to='/home/admin'>管理员管理</Link>,
                                }
                            ]
                        }
                    />
                </Sider>

                <Layout>
                    <Content>
                            <Outlet/>
                    </Content>
                </Layout>
            </Layout>
        </div>
    )
};

export default Home;